package main

import (
	"common/config"
	"common/initialize"
	grpc2 "google.golang.org/grpc"
	"order_server/grpc"
	"order_server/service"
)

func main() {
	config.InitViper()
	initialize.InitNachos(func() {
		initialize.InitMysql()
		initialize.InitRedis()
		initialize.InitEs()
		initialize.InitMonGoDb()

	})
	initialize.InitMysql()
	initialize.InitRedis()
	initialize.InitEs()
	initialize.InitLog()
	initialize.InitMonGoDb()

	grpc.RegisterOrderGrpc("127.0.0.1", 9996, func(server *grpc2.Server) {
		service.OrderRegister(server)
	})
}
